// 请求封装post
const request2 = (url, data) => {
  return fetch("http://118.24.239.63:3001/api" + url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify(data),
  })
    .then((response) => response.json())
    .then((res) => {
      if (res.success) {
        return res;
      } else {
        showFailToast(res.msg);
      }
    });
};

export default request2;
